package ucl.cs.stockbroker.common;

/**
 * StockCompanyInfo. An object for passing information about stock companies.
 * 
 * @author  Min Park, Saniul Ahmed, Kamil Olesiejuk
 *
 */
public class StockCompanyInfo implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	private final String name;
	private final String companySymbol;
	private final double stockPrice;

	/**
	 * StockCompanyInfo object constructor.
	 * 
	 * @param name : String - company name
	 * @param companyCode : String - company symbol
	 * @param price : double - the stock price
	 */
	public StockCompanyInfo(String name, String companyCode, double price) {
		this.name = name;
		this.companySymbol = companyCode;
		this.stockPrice = price;
	}

	/**
	 * Returns the company symbol.
	 * 
	 * @return company symbol : String 
	 */
	public String getCompanySymbol() {
		return this.companySymbol;
	}

	/**
	 * Returns the company name.
	 * 
	 * @return name : String 
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * Returns the stock price of the company in pence.
	 * 
	 * @return price : double - stock price in pence
	 */
	public double getStockPrice() {
		return this.stockPrice;
	}

	public String toString() {
		return "Name:" + this.name + "\nCompany Code:" + this.companySymbol
				+ "\nCurrent Stock Price:" + this.stockPrice;
	}
}